import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'
import Message from '../views/Message.vue'
import Record from '../views/Record.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/index' },
  {
    path: '/index', component: Index, children: [
      { path: '/', redirect: '/message' },
      { path: '/message', component: Message },
      { path: '/record', component: Record }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  routes,
  linkActiveClass: 'bar_active'
})

export default router
